Fixes issue when dealing with batch failures.