Bug fix DFS.