diff --git a/www/plugins/es/js/services/notification-services.js b/www/plugins/es/js/services/notification-services.js
index c74644cde63c4d668360abc741f087eb4555041a..d7faaaed3972b22767ecb0b07ad95fa9f7b83db4 100644
--- a/www/plugins/es/js/services/notification-services.js
+++ b/www/plugins/es/js/services/notification-services.js
@@ -317,6 +317,7 @@ angular.module('cesium.es.notification.services', ['cesium.platform', 'cesium.es
     data.notifications.time = null;
     // Stop listening notification
     if (wsUserEventCloseFn) {
+      console.debug("[ES] [notification] Closing websocket...");
       wsUserEventCloseFn();
       wsUserEventCloseFn = null;
     }
@@ -395,7 +396,7 @@ angular.module('cesium.es.notification.services', ['cesium.platform', 'cesium.es
             // And display such connectivity errors in UI
             UIUtils.alert.error('ACCOUNT.ERROR.WS_CONNECTION_FAILED');
           });
-        wsUserEventCloseFn = wsUserEvent.close;
+        wsUserEventCloseFn = function() {wsUserEvent.close();};
       });
   }