Added the missing else if in the ComparatorImpl