Fix comparator to adhere to c++ standards.