Update upgrade.c