fix upgrade phase