Fixed bugs in TextLine

Fixed bugs in TextLine