Replace global var by argument.