Made a minor change to Dijkstra