Fix leaking variable