Removes unneeded memcpy.