improve content type handling