fix txt leak