Fix bug that would cause simulation to speed up when toggling between datasets