fixed comparator issue