fix gen pi from batchid