fixed write_txc (nw)