diff --git a/bin/compile b/bin/compile
index 4ff2e31515884eb57c8c3c176325e7bd30625cdb..51024d2fb3ab8dcc192ed59ef8ed47117f5c3edd 100755
--- a/bin/compile
+++ b/bin/compile
@@ -124,7 +124,6 @@ if [ ! "$SKIP_INSTALL" ]; then
 
   # Record for future reference.
   echo $PYTHON_VERSION > .heroku/python-version
-  WORKING_DIR=$(pwd)
   FRESH_PYTHON=true
 
   hash -r
@@ -134,6 +133,8 @@ fi
 
 # If Pip isn't up to date:
 if [ "$FRESH_PYTHON" ] || [[ ! $(pip --version) == *$PIP_VERSION* ]]; then
+  WORKING_DIR=$(pwd)
+
   # Prepare it for the real world
   puts-step "Installing Distribute ($DISTRIBUTE_VERSION)"
   cd $ROOT_DIR/vendor/distribute-$DISTRIBUTE_VERSION/