fix mime type detection