remove redundant popd at the end taht's causing error