fixed dijkstra algorithm
fixed dijkstra algorithm