Fix progress bar to update correctly when num generations is changed.