fixed bugs in pf