Fixed mistake where we reset the plot at each iteration