fix issues with DFS