forgot to free the copy_locally buffer