#767 - correct comparison to be consistent with equals
#767 - fix incorrect compareTo() method on OrderWrapper