Minor fixes and getLineHtml for text field