The shortest path - amendment

Fixed Dijkstra's algorithm.