comparator fix - move comparator in unique class.