fixed rendering of undefined textContent in TextElement