fix the cwd problem when fork