fix for batching