Fixed offset bug in batch allocator.