no more nullpointer when clicking tree and searching for word