fixed cwd call