fix "command is exit with code 1" for popd