Fix the bug in ps statement (batchrun)