Fix batch_allstats.py bug of when ipc greater than 1