fixed putative implementation bug in dijkstra