Fix segment fault by modify batch-size.