Fixed a bug where the plot was sometimes skipping a step