correct OWL header and correct primarytype restrictions