Batch mode fixes