Changed to use memcpy.