Fix mime detection