fixed duplicate relationships in comparator