fixes for copy script

actually still seems to be broken