Update upgrade.py