minor fix to upgrade script