Fixing bug in upgrade script