replace struct assigment with memcpy, some compiler/arch versions get them wrong