Fixing var leak