graph: cleanup shortest path steps