batch bug fix