fix bug with mime type check