fix bug on addP3P