more fixes in txt generation