fixed the moving up the search tree problem