Minor changes to graph processing
Fix a bew bugs