diff --git a/src/config.py b/src/config.py
index 4bdf4a1a69de8502f663ad7a010ef36ebb986ca4..fda9a077ad562dd6454c13c4a7c7fa2af4afb947 100644
--- a/src/config.py
+++ b/src/config.py
@@ -37,6 +37,7 @@ import dialogs
 import vcard
 import cell_renderer_image
 import message_control
+import chat_control
 
 try:
 	import gtkspell
@@ -541,40 +542,39 @@ class PreferencesWindow:
 		gajim.interface.save_config()
 		gajim.interface.msg_win_mgr.reconfig()
 
-	def apply_speller(self, kind):
+	def apply_speller(self):
 		for acct in gajim.connections:
-			windows = gajim.interface.instances[acct][kind]
-			jids = windows.keys()
-			for jid in jids:
-				if jid == 'tabbed':
-					continue
-				window = windows[jid]
-				textview = window.message_textviews[jid]
-				gtkspell.Spell(textview)
-
-	def remove_speller(self, kind):
+			for ctrl in gajim.interface.msg_win_mgr.controls():
+				if isinstance(ctrl, chat_control.ChatControlBase):
+					try:
+						spell_obj = gtkspell.get_from_text_view(ctrl.msg_textview)
+					except:
+						spell_obj = None
+
+					print "Current: ", spell_obj
+					if not spell_obj:
+						gtkspell.Spell(ctrl.msg_textview)
+
+	def remove_speller(self):
 		for acct in gajim.connections:
-			windows = gajim.interface.instances[acct][kind]
-			jids = windows.keys()
-			for jid in jids:
-				if jid == 'tabbed':
-					continue
-				window = windows[jid]
-				textview = window.message_textviews[jid]
-				spell_obj = gtkspell.get_from_text_view(textview)
-				if spell_obj:
-					spell_obj.detach()
+			for ctrl in gajim.interface.msg_win_mgr.controls():
+				if isinstance(ctrl, chat_control.ChatControlBase):
+					try:
+						spell_obj = gtkspell.get_from_text_view(ctrl.msg_textview)
+					except:
+						spell_obj = None
+					print "Current: ", spell_obj
+					if spell_obj:
+						spell_obj.detach()
 
 	def on_speller_checkbutton_toggled(self, widget):
 		active = widget.get_active()
 		gajim.config.set('use_speller', active)
 		gajim.interface.save_config()
 		if active:
-			self.apply_speller('chats')
-			self.apply_speller('gc')
+			self.apply_speller()
 		else:
-			self.remove_speller('chats')
-			self.remove_speller('gc')
+			self.remove_speller()
 
 	def update_print_time(self):
 		'''Update time in Opened Chat Windows'''