diff --git a/gajim/common/contacts.py b/gajim/common/contacts.py
index a2ef1a04d214e3d02ba11079e79756c9f9cc3a64..59c8c0051fee6df69216bfc392af8e4c0862f8a4 100644
--- a/gajim/common/contacts.py
+++ b/gajim/common/contacts.py
@@ -402,8 +402,8 @@ class LegacyContactsAPI:
             for jid in self.get_jid_list(account):
                 if jid == our_jid:
                     continue
-                if common.app.jid_is_transport(jid) and not \
-                _('Transports') in groups:
+                if (common.app.jid_is_transport(jid) and
+                        _('Transports') not in groups):
                     # do not count transports
                     continue
                 if self.has_brother(account, jid, accounts) and not \