Fix unproper memcpy usage.