fix copy_to_dist