Chdir before merging