fixed sortOnSpecifity, reversed comparison operator