fixed the issue with setting the cwd