I changed the signature of relax function of Dijkstra algorithm