Fix cwd errors