adjust imports, and fix crash if no content type is specified