more fixes on content type handling