Fixed an upgrade script