fixed comparator stuff