Fixed a comparator bug