fix syntax error in upgrade script