Fix i variable leak