Fixed bug where graph value was not copied correctly with graph.copy()