correct byte ordering in comparisons