Fixing memcpy