Fix mime type management