fix upgrade