BFS fixed