tweaking logic in pre-processing stage for AutoBatch