fixed some issues with the servlet. content and types might not follow eachother