fix batching db issue