fix a bug when textnode's parent node has multiple nodes will clear extra node