Better endian conversion