Fix stupid buffer overflow on memcpy