clean up endian support