Fix bad comparator construction