Fixed comparator not working