Make relationship rules work in ontology