Fixed a wrong byte order handling on big-endian machines.