Fix race condition error when finishing pseudo-time-stepping.