fixed yet another issue with bfs
BFS working again