--fix for networkx compatability problem