diff --git a/apps/fpcagent/src/main/java/org/onosproject/fpcagent/FpcRpcManager.java b/apps/fpcagent/src/main/java/org/onosproject/fpcagent/FpcRpcManager.java
index f29b1a2..19ecb71 100644
--- a/apps/fpcagent/src/main/java/org/onosproject/fpcagent/FpcRpcManager.java
+++ b/apps/fpcagent/src/main/java/org/onosproject/fpcagent/FpcRpcManager.java
@@ -352,6 +352,7 @@
                                 Sets.newHashSet()
                         );
                         contexts.add(context.contextId());
+                        CLIENT_CONTEXTS_INFO.put(clientInfo.clientId(), contexts);
                     }));
 
                     // FIXME why downlink is in session while uplink is not?
@@ -377,6 +378,7 @@
                                     Sets.newHashSet()
                             );
                             contexts.add(context.contextId());
+                            CLIENT_CONTEXTS_INFO.put(clientInfo.clientId(), contexts);
                         }));
                     }
                 } else if (commands.contains("indirect-forward")) {
@@ -567,9 +569,12 @@
         return configureOutput;
     }
 
-    public Collection<Callable<Object>> deleteSessions(ClientIdentifier clientIdentifier) {
-        Collection<Callable<Object>> tasks = new ArrayList<>();
+    public void deleteSessions(ClientIdentifier clientIdentifier) {
         try {
+            if (!CLIENT_CONTEXTS_INFO.keySet().contains(clientIdentifier)) {
+                return;
+            }
+            Collection<Callable<Object>> tasks = new ArrayList<>();
             FpcIdentity tenantId = CLIENT_INFO.get(clientIdentifier).tenantId();
             CacheManager cacheManager = CacheManager.getInstance(tenantId);
 
@@ -650,10 +655,19 @@
                     }));
                 }
             }
+            Executors.newWorkStealingPool().invokeAll(tasks).forEach(
+                    future -> {
+                        try {
+                            future.get();
+                        } catch (Exception e) {
+                            log.error(ExceptionUtils.getFullStackTrace(e));
+                            throw new RuntimeException(e);
+                        }
+                    }
+            );
         } catch (Exception e) {
             log.error(ExceptionUtils.getFullStackTrace(e));
         }
-        return tasks;
     }
 
     public Collection<Callable<Object>> deleteSession(
@@ -1174,7 +1188,6 @@
                        }
                     }
 
-                    CLIENT_INFO.remove(input.clientId());
                     deregisterClientOutput.clientId(input.clientId());
 
                     cpProviderService.getListener().deviceRemoved(input.clientId().toString());
@@ -1194,6 +1207,7 @@
                             .build());
 
                     dynamicConfigService.deleteNode(resourceVal);
+                    CLIENT_INFO.remove(input.clientId());
                 }
             } catch (Exception e) {
                 // if there is an exception respond with an error.
@@ -1311,3 +1325,4 @@
         }
     }
 }
+
diff --git a/apps/fpcagent/src/main/java/org/onosproject/fpcagent/util/FpcUtil.java b/apps/fpcagent/src/main/java/org/onosproject/fpcagent/util/FpcUtil.java
index 23934b7..0f7dd6c 100644
--- a/apps/fpcagent/src/main/java/org/onosproject/fpcagent/util/FpcUtil.java
+++ b/apps/fpcagent/src/main/java/org/onosproject/fpcagent/util/FpcUtil.java
@@ -324,11 +324,7 @@
                         .build()
         );
         dataNode.dataNodes().forEach(
-                node -> {
-                    if (!dynamicConfigService.nodeExist(dataNode.resourceId())) {
-                        dynamicConfigService.createNode(dataNode.resourceId(), node);
-                    }
-                }
+                node -> dynamicConfigService.createNode(dataNode.resourceId(), node)
         );
     }
 
@@ -346,11 +342,7 @@
                         .build()
         );
         dataNode.dataNodes().forEach(
-                node -> {
-                    if (!dynamicConfigService.nodeExist(dataNode.resourceId())) {
-                        dynamicConfigService.updateNode(dataNode.resourceId(), node);
-                    }
-                }
+                node -> dynamicConfigService.updateNode(dataNode.resourceId(), node)
         );
     }
 
diff --git a/scripts/get-topology.sh b/scripts/get-topology.sh
index 834cf8b..ec03527 100755
--- a/scripts/get-topology.sh
+++ b/scripts/get-topology.sh
@@ -9,7 +9,6 @@
 
 echo ""
 curl -i -s \
---header "Content-type: application/json" \
 --request GET \
 -u onos:rocks \
 http://localhost:8181/onos/restconf/data/ietf-dmm-fpcagent:tenants/tenant=default/fpc-topology
