corrected reset on graph for repeated simulation