Dijkstra's alg small compatibility fix