diff --git a/views/ngXosLib/gulpfile.js b/views/ngXosLib/gulpfile.js
index e514d7a..e030ad9 100644
--- a/views/ngXosLib/gulpfile.js
+++ b/views/ngXosLib/gulpfile.js
@@ -2,6 +2,7 @@
 
 var gulp = require('gulp');
 var wrench = require('wrench');
+var path = require('path');
 
 var options = {
   ngXosVendor: '../../xos/core/xoslib/static/js/vendor/', //save here the minfied vendor file, this is automatically loaded in the django page
@@ -11,9 +12,9 @@
   docs: './docs'
 };
 
-wrench.readdirSyncRecursive('./gulp')
+wrench.readdirSyncRecursive(path.join(__dirname, './gulp'))
 .map(function(file) {
-  require('./gulp/' + file)(options);
+  require(path.join(__dirname, './gulp/' + file))(options);
 });
 
 gulp.task('default', function () {
diff --git a/views/ngXosLib/xosHelpers/src/services/notification.service.js b/views/ngXosLib/xosHelpers/src/services/notification.service.js
index 7c4154b..e190451 100644
--- a/views/ngXosLib/xosHelpers/src/services/notification.service.js
+++ b/views/ngXosLib/xosHelpers/src/services/notification.service.js
@@ -1,7 +1,6 @@
 (function() {
   'use strict';
 
-
   angular
   .module('xos.helpers')
   .factory('Notification', function(){
diff --git a/views/ngXosViews/synchronizerNotifier/src/js/main.js b/views/ngXosViews/synchronizerNotifier/src/js/main.js
index 1d7de32..54ef0a6 100644
--- a/views/ngXosViews/synchronizerNotifier/src/js/main.js
+++ b/views/ngXosViews/synchronizerNotifier/src/js/main.js
@@ -6,29 +6,6 @@
   'ui.router',
   'xos.helpers'
 ])
-.config(function($provide) {
-  $provide.decorator('$rootScope', function($delegate) {
-    var Scope = $delegate.constructor;
-    // var origBroadcast = Scope.prototype.$broadcast;
-    // var origEmit = Scope.prototype.$emit;
-    var origOn = Scope.prototype.$on;
-
-    // Scope.prototype.$broadcast = function() {
-    //   // console.log("$broadcast was called on $scope " + $scope.$id + " with arguments:", arguments);
-    //   return origBroadcast.apply(this, arguments);
-    // };
-    // Scope.prototype.$emit = function() {
-    //   // console.log("$emit was called on $scope " + $scope.$id + " with arguments:", arguments);
-    //   return origEmit.apply(this, arguments);
-    // };
-
-    Scope.prototype.$on = function(){
-      // console.log('$on', arguments, arguments[1].toString());
-      return origOn.apply(this, arguments);
-    }
-    return $delegate;
-  });
-})
 .service('Diag', function($rootScope, $http, $q, $interval){
 
   let isRunning = false;
@@ -50,6 +27,7 @@
     diags.forEach(d => {
       let status = JSON.parse(d.backend_register);
       status.last_run = new Date(status.last_run * 1000);
+      status.last_duration = status.last_duration * 1000;
       status.last_synchronizer_start = new Date(status.last_synchronizer_start * 1000);
       status.last_syncrecord_start = status.last_syncrecord_start ? new Date(status.last_syncrecord_start * 1000) : null;
       $rootScope.$broadcast(`diag`, {
@@ -77,25 +55,26 @@
 
   this.getSyncStatus = (status) => {
 
-    let gap = 5 * 60 * 1000; /* ms */
-    // let gap = 2;
-    if(status.last_run > status.last_synchronizer_start){
-      // the synchronizer has finished
-      return true;
-    }
-    else {
+    // let gap = 5 * 60 * 1000; /* ms */
+    let gap = 1 * 60 * 1000;
+    // if(status.last_run > status.last_synchronizer_start){
+    //   // the synchronizer has finished
+    //   return true;
+    // }
+    // else {
       // the synchronizer is running
-      if(!status.last_syncrecord_start){
-        // but no step have been completed
-        return false;
-      }
-      else if (((new Date()) - status.last_syncrecord_start) > gap){
+      // if(status.last_syncrecord_start){
+      //   // but no step have been completed
+      //   return false;
+      // }
+      // else
+      if (((new Date()) - status.last_syncrecord_start) > gap){
         return false;
       }
       else{
         return true;
       }
-    }
+    // }
   }
 
   $interval(() => {
@@ -105,10 +84,7 @@
         this.sendEvents(diags);
       });
     }
-  }, 25000);
-})
-.run(function($log){
-  $log.info('Listening for Syncronizers Events!');
+  }, 10000);
 })
 .directive('syncStatus', function() {
   return {
@@ -117,18 +93,41 @@
     bindToController: true,
     controllerAs: 'vm',
     templateUrl: 'templates/sync-status.tpl.html',
-    controller: function($log, $rootScope, Diag){
+    controller: function($log, $rootScope, Diag, xosNotification){
       Diag.start();
       this.showNotificationPanel = true;
       this.synchronizers = {};
 
+      const notified = {};
+
+      // xosNotification.notify('test', {icon: 'http://localhost:8888/static/cord-logo.png', body: 'Diag'});
+
       this.showNoSync = true;
 
       $rootScope.$on('diag', (e, d) => {
-        if(d.name === 'vcpe'){
-          $log.info('Received event: ', d.info.last_run, d.info.last_synchronizer_start);
+        // console.log(d.name);
+        if(d.name === 'global'){
+          $log.info('Received event: ', d.info.last_syncrecord_start);
         }
         this.synchronizers[d.name] = d;
+
+        if(!d.status){
+          
+          if(!notified[d.name]){
+            console.log('sent notify');
+            xosNotification.notify('CORD Synchronizer Error', {
+              icon: 'http://localhost:8888/static/cord-logo.png',
+              body: `[DEBUG] The ${d.name} synchronizer has stopped.`
+            });
+          }
+
+          notified[d.name] = true;
+        }
+        else {
+          notified[d.name] = false;
+        }
+
+        // hide list if empty
         this.showNoSync = false;
         if(Object.keys(this.synchronizers).length === 0){
           this.showNoSync = true;
