Fix for "null ontology entry" error