Fix invalid syntax in upgrade.sh