diff --git a/core/net/src/main/java/org/onosproject/net/device/impl/DeviceManager.java b/core/net/src/main/java/org/onosproject/net/device/impl/DeviceManager.java
index cd8ab96..a85ee8f 100644
--- a/core/net/src/main/java/org/onosproject/net/device/impl/DeviceManager.java
+++ b/core/net/src/main/java/org/onosproject/net/device/impl/DeviceManager.java
@@ -513,6 +513,7 @@
             final DeviceId deviceId = device.id();
             MastershipRole myRole = mastershipService.getLocalRole(deviceId);
             log.trace("Checking device {}. Current role is {}", deviceId, myRole);
+            log.info("Device local status is {}", localStatus(deviceId));
             if (!isReachable(deviceId)) {
                 if (myRole != NONE) {
                     // Verify if the device is fully disconnected from the cluster
@@ -1079,6 +1080,7 @@
         }
 
         final boolean isReachable = isReachable(did);
+        log.info("Device local status is {}", localStatus(did));
         if (!isReachable) {
             // device is not connected to this node, nevertheless we should get a role
             if (mastershipService.getLocalRole(did) == NONE) {
diff --git a/providers/general/device/src/main/java/org/onosproject/provider/general/device/impl/GeneralDeviceProvider.java b/providers/general/device/src/main/java/org/onosproject/provider/general/device/impl/GeneralDeviceProvider.java
index 6ce3269..4c3018a 100644
--- a/providers/general/device/src/main/java/org/onosproject/provider/general/device/impl/GeneralDeviceProvider.java
+++ b/providers/general/device/src/main/java/org/onosproject/provider/general/device/impl/GeneralDeviceProvider.java
@@ -797,14 +797,24 @@
         }
 
         final MastershipRole deviceRole = handshaker.getRole();
+        // FIXME: we should be checking the mastership term as well.
         if (expectedRole != deviceRole) {
-            // FIXME: we should be checking the mastership term as well.
-            log.debug("Detected role mismatch for {}, core expects {}, " +
-                             "but device reports {}, waiting for mastership " +
-                             "service  to fix this...",
-                     deviceId, expectedRole, deviceRole);
-            // Gentle nudge to fix things...
-            providerService.receivedRoleReply(deviceId, deviceRole);
+            // Let's be greedy, if the role is NONE likely is due to the lazy channel
+            if (deviceRole == MastershipRole.NONE) {
+                log.warn("Detected role mismatch for {}, core expects {}, " +
+                                "but device reports {}, reassert the role... ",
+                        deviceId, expectedRole, deviceRole);
+                /* If we are experience a severe issue, eventually
+                   the DeviceManager will move the mastership */
+                roleChanged(deviceId, expectedRole);
+            } else {
+                log.debug("Detected role mismatch for {}, core expects {}, " +
+                                "but device reports {}, waiting for mastership " +
+                                "service  to fix this...",
+                        deviceId, expectedRole, deviceRole);
+                // Gentle nudge to fix things...
+                providerService.receivedRoleReply(deviceId, deviceRole);
+            }
             return;
         }
 
