Fix current working directory bug