Changes to upgrade scripts