small change to dijkstra stop