diff --git a/src/common/contacts.py b/src/common/contacts.py
index 40d54f786aaa0b00dfd0fd87535db8c8d8940fc5..81c3a4dd215776a93153fd72515c413277992c2f 100644
--- a/src/common/contacts.py
+++ b/src/common/contacts.py
@@ -292,7 +292,7 @@ class Contacts:
 	def iter_contacts(self, account):
 		if account in self._contacts:
 			for jid in self._contacts[account].keys():
-				for contact in self._contacts[account][jid].keys():
+				for contact in self._contacts[account][jid]:
 					yield contact
 
 	def get_contact_from_full_jid(self, account, fjid):