fixed bug in bfs