remove extra pushd/popd