fix upgrade problem