fixed dfs issue