fixed a mime type detection bug