Fixed DAG subgraph bug