fixed some bugs related to data collection in the batch api.