Fixed cd in repo_sync()