fix auto batch, works well now