bug fix where batches were not being saved appropriately.