Fixed a bug in Dijkstra's that forced all nodes to be simultaneously exit nodes and source nodes