Endian fixes