When does the Dijkstra's algorithm fail to find the shortest path in a graph?