comparator order fix