fix bugs

- fixed: duplicated files in copy function