Ensure warnings are always cleared when executing batches