diff --git a/continuousintegration/orchestration/tests/client_ar.sh b/continuousintegration/orchestration/tests/client_ar.sh
index c971e3ff42649d21e711f13039061e5c34c19d3e..c93dca971784025f5964c47b6db8eb7f91f443e6 100644
--- a/continuousintegration/orchestration/tests/client_ar.sh
+++ b/continuousintegration/orchestration/tests/client_ar.sh
@@ -439,7 +439,7 @@ while [[ ${REMAINING_REQUESTS} > 0 ]]; do
 
   REMAINING_REQUESTS=`admin_cta --json sq | jq -r '.[] | select (.mountType == "RETRIEVE") | [ .queuedFiles | tonumber ] | reduce .[] as $n (0;.+$n)'`;
   # Prevent the result from being empty
-  if [ -z $REMAINING_REQUESTS ]; then REMAINING_REQUESTS='0'; fi
+  if [ -z "$REMAINING_REQUEST" ]; then REMAINING_REQUESTS='0'; fi
 done
 
 # Check that the files were not retrieved