patch in finally blocks to include batching.set(false) always