fixing method wander. textnodes are nonetype