Fix issue in bfs...