fix TextWrite and initText