fix batching