fix batch index