diff --git a/src/roster_window.py b/src/roster_window.py
index e7334dae2b66e0eed6f2eb601ba6e8fe0f91bc2f..f0cd4dfc79a67e4ed09231286b2fe5b0233043ae 100644
--- a/src/roster_window.py
+++ b/src/roster_window.py
@@ -3798,6 +3798,8 @@ class RosterWindow:
 			if account == '':
 				print "Multi accounts"
 				for account in accounts:
+					if not gajim.account_is_connected(account):
+						continue
 					if not gajim.config.get_per('accounts', account,
 					'sync_with_global_status'):
 						continue