Stop subgraph on shutdown