Got the endianness check a little backwards