Fixed bugs in txt.