fixing memcpy sizes