Fix channels comparator function