fix RTE on Copy

* Fixes a runtime error copying files introduced in 0.4.5