Fix termination condition in breadth first search.