fixed a problem in textgen