revert previous changes, keep the chdir