explicit calls to copy_memory in more places