fix bugs in addition of PF