Fix auto-resize of TextElement