Fix global var leak.

Just needed to add a 'var' to a local variable.