Move the sleep before the migration generation to avoid a migration number conflict