Type mismatch corrected for Comparator definition and use.