diff --git a/datamover/dist/datamover.sh b/datamover/dist/datamover.sh
index b799188ba231584f5a9233bb191808506856e029..19a121aa9a0f686db896d446d963fe22515b9321 100755
--- a/datamover/dist/datamover.sh
+++ b/datamover/dist/datamover.sh
@@ -217,7 +217,16 @@ case "$command" in
       isPIDRunning $PID
       if [ $? -eq 0 ]; then
         kill $PID
-        if [ $? -eq 0 ]; then
+        n=0
+        while [ $n -lt $MAX_LOOPS ]; do
+          isPIDRunning $PID
+          if [ $? -ne 0 ]; then
+            break
+          fi
+          n=$(($n+1))
+        done
+        isPIDRunning $PID
+        if [ $? -ne 0 ]; then
           echo "(pid $PID)"
           # Shouldn't be necessary as Datamover deletes the file itself, but just to be sure
           test -f $PIDFILE && rm $PIDFILE 2> /dev/null