fix textContent for nodes that do not have children