fixed handling of layout information in getText()