fix copy_to