Text node bug fix