fix bug with null when ontology is not needed