Fixed having inverted results

The Pair compaterTo() was reversed.