Swap memcpy parameter, hopefully to make it work.