fixed dijkstra issue