mimetype fixes patch by (Ryutaroh Matsumoto <ryutaroh at it dot ss dot titech dot...