Fix global variables in If Statements after changes in d1278f2a19.