fix to getting the content type directly from the headers