diff --git a/protocols/ovsdb/api/src/main/java/org/onosproject/ovsdb/controller/OvsdbClientService.java b/protocols/ovsdb/api/src/main/java/org/onosproject/ovsdb/controller/OvsdbClientService.java
index dd0d787..109f84f 100644
--- a/protocols/ovsdb/api/src/main/java/org/onosproject/ovsdb/controller/OvsdbClientService.java
+++ b/protocols/ovsdb/api/src/main/java/org/onosproject/ovsdb/controller/OvsdbClientService.java
@@ -55,7 +55,7 @@
      * selectSrcPort or packets containing selectVlan
      * to mirrorPort or to all ports that trunk mirrorVlan.
      *
-     * @param  bridgeName the name of the bridge
+     * @param bridgeName the name of the bridge
      * @param mirror the OVSDB mirror description
      * @return true if mirror creation is successful, false otherwise
      */
@@ -119,14 +119,14 @@
     /**
      * Gets a qos of node.
      * @param qosId qos identifier
-     * @return null if no qos is find
+     * @return null if no qos is found
      */
     OvsdbQos getQos(QosId qosId);
 
     /**
      * Gets qoses of node.
      *
-     * @return set of qoses; empty if no qos is find
+     * @return set of qoses; empty if no qos is found
      */
     Set<OvsdbQos> getQoses();
 
@@ -165,14 +165,14 @@
     /**
      * Gets a queue of node.
      * @param queueId the queue identifier
-     * @return null if no queue is find
+     * @return null if no queue is found
      */
     OvsdbQueue getQueue(QueueId queueId);
 
     /**
      * Gets queues of node.
      *
-     * @return set of queues; empty if no queue is find
+     * @return set of queues; empty if no queue is found
      */
     Set<OvsdbQueue> getQueues();
 
@@ -211,7 +211,7 @@
     /**
      * Gets bridges of node.
      *
-     * @return set of bridges; empty if no bridge is find
+     * @return set of bridges; empty if no bridge is found
      */
     Set<OvsdbBridge> getBridges();
 
@@ -219,7 +219,7 @@
      * Gets controllers of node.
      *
      * @param openflowDeviceId target device id
-     * @return set of controllers; empty if no controller is find
+     * @return set of controllers; empty if no controller is found
      */
     Set<ControllerInfo> getControllers(DeviceId openflowDeviceId);
 
@@ -262,14 +262,14 @@
     /**
      * Gets ports of bridge.
      *
-     * @return set of ports; empty if no ports is find
+     * @return set of ports; empty if no ports is found
      */
     Set<OvsdbPort> getPorts();
 
     /**
      * Gets interfaces of bridge.
      *
-     * @return set of interfaces; empty if no interface is find
+     * @return set of interfaces; empty if no interface is found
      */
     Set<Interface> getInterfaces();
 
@@ -292,7 +292,7 @@
      * Gets the Bridge uuid.
      *
      * @param bridgeName bridge name
-     * @return bridge uuid, empty if no uuid is find
+     * @return bridge uuid, empty if no uuid is found
      */
     String getBridgeUuid(String bridgeName);
 
@@ -301,7 +301,7 @@
      *
      * @param portName   port name
      * @param bridgeUuid bridge uuid
-     * @return port uuid, empty if no uuid is find
+     * @return port uuid, empty if no uuid is found
      */
     String getPortUuid(String portName, String bridgeUuid);
 
@@ -336,7 +336,7 @@
      * @param dbName    database name
      * @param tableName table name
      * @param uuid      row uuid
-     * @return row OVSDB row
+     * @return row, empty if no row is found
      */
     Row getRow(String dbName, String tableName, String uuid);
 
@@ -381,7 +381,7 @@
      * Considered port as created if port's interface table also gets created,irrespective
      * of ofport value(has errors or not)
      */
-    public List<OvsdbPortName> getPorts(List<String> portNames, DeviceId bridgeId);
+    List<OvsdbPortName> getPorts(List<String> portNames, DeviceId bridgeId);
 
     /**
      * Gets error status for the given portNames.
@@ -397,20 +397,21 @@
      *
      * @param dbName  db name
      * @param tblName table name
-     * @return first table entry
+     * @return firstRow, first row of the given table from given db if present
      */
-
-    public Optional<Object> getFirstRow(String dbName, OvsdbTable tblName);
+    Optional<Object> getFirstRow(String dbName, OvsdbTable tblName);
 
     /**
      * Gets device CPU usage in percentage.
-     * @return device memory usage.
+     *
+     * @return cpuStats, empty data as there is no generic way to fetch such stats
      */
     Optional<DeviceCpuStats> getDeviceCpuUsage();
 
     /**
      * Gets device memory usage in kilobytes.
-     * @return device memory usage.
+     *
+     * @return memoryStats, empty data as there is no generic way to fetch such stats
      */
     Optional<DeviceMemoryStats> getDeviceMemoryUsage();
 
diff --git a/protocols/ovsdb/api/src/main/java/org/onosproject/ovsdb/controller/driver/DefaultOvsdbClient.java b/protocols/ovsdb/api/src/main/java/org/onosproject/ovsdb/controller/driver/DefaultOvsdbClient.java
index c32c341..2d8ee68 100644
--- a/protocols/ovsdb/api/src/main/java/org/onosproject/ovsdb/controller/driver/DefaultOvsdbClient.java
+++ b/protocols/ovsdb/api/src/main/java/org/onosproject/ovsdb/controller/driver/DefaultOvsdbClient.java
@@ -233,14 +233,6 @@
         return rowStore;
     }
 
-    /**
-     * Gets the ovsdb row.
-     *
-     * @param dbName    the ovsdb database name
-     * @param tableName the ovsdb table name
-     * @param uuid      the key of the row
-     * @return row, empty if row is find
-     */
     @Override
     public Row getRow(String dbName, String tableName, String uuid) {
         OvsdbTableStore tableStore = getTableStore(dbName);
@@ -283,12 +275,6 @@
         ovsdbStore.createOrUpdateOvsdbStore(dbName, tableStore);
     }
 
-    /**
-     * Gets the Mirror uuid.
-     *
-     * @param mirrorName mirror name
-     * @return mirror uuid, empty if no uuid is found
-     */
     @Override
     public String getMirrorUuid(String mirrorName) {
         DatabaseSchema dbSchema = schema.get(DATABASENAME);
@@ -316,12 +302,6 @@
         return null;
     }
 
-    /**
-     * Gets mirrors of the device.
-     *
-     * @param deviceId target device id
-     * @return set of mirroring; empty if no mirror is found
-     */
     @Override
     public Set<MirroringStatistics> getMirroringStatistics(DeviceId deviceId) {
         Uuid bridgeUuid = getBridgeUuid(deviceId);
@@ -584,8 +564,20 @@
                                     bridgeUuid.value(),
                                     c.getRow()));
 
-        removeControllers.forEach(c -> deleteConfig(CONTROLLER, UUID, c.getRow().uuid().value(),
-                BRIDGE, BRIDGE_CONTROLLER, c.getRow().uuid()));
+        // Controller removal is extremely dangerous operation, because with
+        // empty controller list, all existing flow rules will be wiped out.
+        // To harden the setController operation, we need to double check whether
+        // the updated controller list size is bigger than the remove controller list size
+        List<Controller> updatedControllers = getControllers(bridgeUuid);
+        if (updatedControllers != null && updatedControllers.size() > removeControllers.size()) {
+            removeControllers.forEach(c ->
+                    deleteConfig(CONTROLLER, UUID, c.getRow().uuid().value(),
+                    BRIDGE, BRIDGE_CONTROLLER, c.getRow().uuid()));
+        } else {
+            log.warn("New controllers were not properly configured to OVS " +
+                    "bridge {} or failed to retrieve controller list from OVS " +
+                    "bridge {}", bridgeUuid, bridgeUuid);
+        }
     }
 
     @Override
@@ -951,15 +943,7 @@
                 .collect(Collectors.toSet());
         return ovsdbqueues;
     }
-    /**
-     * Creates a mirror port. Mirrors the traffic
-     * that goes to selectDstPort or comes from
-     * selectSrcPort or packets containing selectVlan
-     * to mirrorPort or to all ports that trunk mirrorVlan.
-     *
-     * @param mirror the OVSDB mirror description
-     * @return true if mirror creation is successful, false otherwise
-     */
+
     @Override
     public boolean createMirror(String bridgeName, OvsdbMirror mirror) {
 
@@ -1071,11 +1055,6 @@
         return true;
     }
 
-    /**
-     * Drops the configuration for mirror.
-     *
-     * @param mirroringName name of mirror to drop
-     */
     @Override
     public void dropMirror(MirroringName mirroringName) {
         String mirrorUuid = getMirrorUuid(mirroringName.name());
@@ -1928,13 +1907,6 @@
                 .findFirst().orElse(null);
     }
 
-    /**
-     * Get first row of given table from given db.
-     *
-     * @param dbName  db name
-     * @param tblName table name
-     * @return firstRow, first row of the given table from given db if present
-     */
     @Override
     public Optional<Object> getFirstRow(String dbName, OvsdbTable tblName) {
 
@@ -1969,22 +1941,12 @@
     }
 
 
-    /**
-     * Get memory usage of device.
-     *
-     * @return memoryStats, empty data as there is no generic way to fetch such stats
-     */
     @Override
     public Optional<DeviceMemoryStats> getDeviceMemoryUsage() {
         return Optional.empty();
     }
 
 
-    /**
-     * Get cpu usage of device.
-     *
-     * @return cpuStats, empty data as there is no generic way to fetch such stats
-     */
     @Override
     public Optional<DeviceCpuStats> getDeviceCpuUsage() {
         return Optional.empty();
