fix the call so that it does not get confused if $cwd has changed