Fixed overwriting oldpwd