Fixed a problem with converting endianness.