Fix rpc endianness