diff --git a/src/gajim.py b/src/gajim.py
index 2df7d893ce32f2b06ceeb10e9135de35b962a77b..d9ebe330b276b502e94500cef3b533d9b4328fb0 100755
--- a/src/gajim.py
+++ b/src/gajim.py
@@ -1763,6 +1763,7 @@ class Interface:
 					account, jid)
 				if resource and highest_contact.resource == resource:
 					resource = None
+					fjid = jid
 				contact = gajim.contacts.get_contact(account, jid, resource)
 				if not contact or isinstance(contact, list):
 					contact = highest_contact