fix error with body extraction based on mime type