correct upgrade script