fix upgrade check