parse ontology terms correctly