diff --git a/src/common/connection_handlers.py b/src/common/connection_handlers.py
index 79c00ada8fe18724a21a217258e67f23038f2b11..ed91a57b767fad3c5a673b8288145c4e38a24952 100644
--- a/src/common/connection_handlers.py
+++ b/src/common/connection_handlers.py
@@ -2121,12 +2121,12 @@ def _presenceCB(self, con, prs):
 		elif ptype == 'error':
 			errmsg = prs.getError()
 			errcode = prs.getErrorCode()
-			if errcode == '502': # Internal Timeout:
-				self.dispatch('NOTIFY', (jid_stripped, 'error', errmsg, resource,
-					prio, keyID, timestamp, None))
-			else:	# print in the window the error
+			if errcode != '502': # Internal Timeout:
+				# print in the window the error
 				self.dispatch('ERROR_ANSWER', ('', jid_stripped,
 					errmsg, errcode))
+			self.dispatch('NOTIFY', (jid_stripped, 'error', errmsg, resource, prio,
+				keyID, timestamp, None))
 
 		if ptype == 'unavailable' and jid_stripped in self.sessions:
 			# automatically terminate sessions that they haven't sent a thread ID in