fixed dijkstra path solver.