Minor changes to graph traversal.