fixed bug in P.ptx calculation