Fixed issue #2702
Fixed issue #2703, improved tests against graph.