more fixes to postprocess script