Better handling of content_type