potential bug fix: sort sets when comparator calls unique