bug fix for Batch