fixed an issue in copy