fix ApplyOntologyHandler issues