fix upgrade case