Fix weird file copy issue