Fixed a little/big endian bug