fix a lost COW memcpy