fixed all bugs with dijkstra's