fix issue with end of batch