Fix minor cwd bug