correction to upgrade.js