diff --git a/src/gajim.py b/src/gajim.py
index 6f4446be734426259cc1712f3535765f5fd4192f..c15972f713d4d179eadf2547468a4c459629c410 100755
--- a/src/gajim.py
+++ b/src/gajim.py
@@ -495,6 +495,8 @@ class Interface:
 			# It's a Private message
 			pm = True
 
+		chat_control = None
+		jid_of_control = full_jid_with_resource
 		highest_contact = gajim.contacts.get_contact_with_highest_priority(
 			account, jid)
 		# Look for a chat control that has the given resource, or default to one