Fix bug of network graph(#2847) and trivial code clean up.
Merge pull request #2855 from hiroponz/fix-bug-of-network-graph

Fix bug of network graph(#2847) and trivial code clean up.