diff --git a/util/build_detector.sh b/util/build_detector.sh
index bccf765b24b79d9aa00d5075a1c20f321abfb1fd..c8f7be41aabd3b4917f50d9ea37fbe84ea542b4e 100755
--- a/util/build_detector.sh
+++ b/util/build_detector.sh
@@ -33,7 +33,8 @@ if [ ! -d ${JUGGLER_DETECTOR} ]; then
 else
   echo "Updating ${JUGGLER_DETECTOR}"
   pushd ${JUGGLER_DETECTOR}
-  git pull --ff-only
+  git fetch origin
+  git checkout -b ${JUGGLER_DETECTOR_VERSION}
   popd
 fi
 ## We also need an up-to-date copy of the accelerator. For now this is done