fix upgrade mess