fixing stupid memcpy mistake