Fix variable leak