diff --git a/adaptor-xmpp.js b/adaptor-xmpp.js
index 12cba77..08d8e65 100644
--- a/adaptor-xmpp.js
+++ b/adaptor-xmpp.js
@@ -81,6 +81,13 @@ function onBuddy(jid, state, statusText, resource) {
         statusText: statusText,
         lastUpdate: moment().format('YYYY-MM-DD HH:mm:ss')
     }
+
+    if (resource != 'undefined' && matrix.buddies[jid].resources.undefined) {
+        try {
+            delete matrix.buddies[jid].resources.undefined;
+        }
+        catch(e) {};
+    }
 }
 
 function isPartnerOffline(partner) {