bug fix for a cwd issue