Synchronizations to fix cases where simulation stops before tasks are
added.