fixing directed DFS