diff --git a/.gitlab/ci/cibuildwheel_build_deps_before_build_wheel.sh b/.gitlab/ci/cibuildwheel_build_deps_before_build_wheel.sh
index 16c39da0010af405c46153b653a69024e602b81b..a868d5573002d9a5b06fe5c1c840ee708988c982 100755
--- a/.gitlab/ci/cibuildwheel_build_deps_before_build_wheel.sh
+++ b/.gitlab/ci/cibuildwheel_build_deps_before_build_wheel.sh
@@ -1,7 +1,7 @@
 #!/bin/bash
 set -x
 set -e
-if [[ $repo ==  "" ]]; then # case for aidge_ core
+if [[ $AIDGE_DEPENDENCIES ==  "" ]]; then # case for aidge_ core
   mkdir -p build # creating build if its not already there to hold the build of cpp files
   rm -rf build/* # build from scratch
 else 
@@ -20,6 +20,7 @@ else
     mkdir -p build # creating build if its not already there to hold the build of cpp files
     rm -rf build/* # build from scratch
     pip install . -v
+    cd -
   done
 fi
 set +x