Update run_flat_batch with reset function