diff --git a/execution/run_uc1-new.sh b/execution/run_uc1-new.sh
index 6e09144af2216b142fa1028863fa98beefff93b2..f3beccdf6a15b2155390f2ed7a31430e15fcc798 100755
--- a/execution/run_uc1-new.sh
+++ b/execution/run_uc1-new.sh
@@ -83,7 +83,26 @@ echo "Finish topic deletion, print topics:"
 echo "Delete ZooKeeper configurations used for workload generation"
 kubectl exec zookeeper-client -- bash -c "zookeeper-shell my-confluent-cp-zookeeper:2181 deleteall /workload-generation"
 echo "Waiting for deletion"
-sleep 5s
+
+while [ true ]
+do
+    IFS=', ' read -r -a array <<< $(kubectl exec zookeeper-client -- bash -c "zookeeper-shell my-confluent-cp-zookeeper:2181 ls /" | tail -n 1 | awk -F[\]\[] '{print $2}')
+    found=0
+    for element in "${array[@]}"
+    do
+        if [ "$element" == "workload-generation" ]; then
+                found=1
+                break
+        fi
+    done
+    if [ $found -ne 1 ]; then
+        echo "ZooKeeper reset was successful."
+        break
+    else 
+        echo "ZooKeeper reset was not successful. Retrying in 5s."
+        sleep 5s
+    fi
+done
 echo "Deletion finished"
 
 echo "Exiting script"
diff --git a/execution/run_uc2-new.sh b/execution/run_uc2-new.sh
index bd33b305c61f4a962b426e7b0c32f0a6b4b4f454..d913b135ecad59ae22d480645125a502d8b2769c 100755
--- a/execution/run_uc2-new.sh
+++ b/execution/run_uc2-new.sh
@@ -76,7 +76,26 @@ echo "Finish topic deletion, print topics:"
 echo "Delete ZooKeeper configurations used for workload generation"
 kubectl exec zookeeper-client -- bash -c "zookeeper-shell my-confluent-cp-zookeeper:2181 deleteall /workload-generation"
 echo "Waiting for deletion"
-sleep 5s
+
+while [ true ]
+do
+    IFS=', ' read -r -a array <<< $(kubectl exec zookeeper-client -- bash -c "zookeeper-shell my-confluent-cp-zookeeper:2181 ls /" | tail -n 1 | awk -F[\]\[] '{print $2}')
+    found=0
+    for element in "${array[@]}"
+    do
+        if [ "$element" == "workload-generation" ]; then
+                found=1
+                break
+        fi
+    done
+    if [ $found -ne 1 ]; then
+        echo "ZooKeeper reset was successful."
+        break
+    else 
+        echo "ZooKeeper reset was not successful. Retrying in 5s."
+        sleep 5s
+    fi
+done
 echo "Deletion finished"
 
 echo "Exiting script"
diff --git a/execution/run_uc3-new.sh b/execution/run_uc3-new.sh
index 4d48eedb91b61ec81753b7fa6d5725e0f6e95c91..725b1ab955f3bae33748bd451603a0307d34746e 100755
--- a/execution/run_uc3-new.sh
+++ b/execution/run_uc3-new.sh
@@ -84,7 +84,26 @@ echo "Finish topic deletion, print topics:"
 echo "Delete ZooKeeper configurations used for workload generation"
 kubectl exec zookeeper-client -- bash -c "zookeeper-shell my-confluent-cp-zookeeper:2181 deleteall /workload-generation"
 echo "Waiting for deletion"
-sleep 5s
+
+while [ true ]
+do
+    IFS=', ' read -r -a array <<< $(kubectl exec zookeeper-client -- bash -c "zookeeper-shell my-confluent-cp-zookeeper:2181 ls /" | tail -n 1 | awk -F[\]\[] '{print $2}')
+    found=0
+    for element in "${array[@]}"
+    do
+        if [ "$element" == "workload-generation" ]; then
+                found=1
+                break
+        fi
+    done
+    if [ $found -ne 1 ]; then
+        echo "ZooKeeper reset was successful."
+        break
+    else 
+        echo "ZooKeeper reset was not successful. Retrying in 5s."
+        sleep 5s
+    fi
+done
 echo "Deletion finished"
 
 echo "Exiting script"
diff --git a/execution/run_uc4-new.sh b/execution/run_uc4-new.sh
index b5156796d3aacb8645d23876ae7eca3754713967..c9fbfdae53d2f9c0336de24c857f02520c8455a4 100755
--- a/execution/run_uc4-new.sh
+++ b/execution/run_uc4-new.sh
@@ -79,7 +79,26 @@ echo "Finish topic deletion, print topics:"
 echo "Delete ZooKeeper configurations used for workload generation"
 kubectl exec zookeeper-client -- bash -c "zookeeper-shell my-confluent-cp-zookeeper:2181 deleteall /workload-generation"
 echo "Waiting for deletion"
-sleep 5s
+
+while [ true ]
+do
+    IFS=', ' read -r -a array <<< $(kubectl exec zookeeper-client -- bash -c "zookeeper-shell my-confluent-cp-zookeeper:2181 ls /" | tail -n 1 | awk -F[\]\[] '{print $2}')
+    found=0
+    for element in "${array[@]}"
+    do
+        if [ "$element" == "workload-generation" ]; then
+                found=1
+                break
+        fi
+    done
+    if [ $found -ne 1 ]; then
+        echo "ZooKeeper reset was successful."
+        break
+    else 
+        echo "ZooKeeper reset was not successful. Retrying in 5s."
+        sleep 5s
+    fi
+done
 echo "Deletion finished"
 
 echo "Exiting script"