delete links on ontology deletion. fix #331