Fixing P bug