Fix cleanup on first text node