Fix reordering comparisons

Close #143