fixes on path for bfs