Fix thinko (mask).  Better endian check.