Variable leaking to global context