fix not changing directory bug