bug fix for content-type "text/plain" does not work well