Fixed the upgrade script
Fixed the upgrade script (again)