Fixed a working dijkstra algorithm