fixed dfs bfs