revise the upgrade code,that work no problem