Fixed the speed issue of passes in tree search.