Fixes issues with working dirs.