P2pProxy plugin: fix some logic errors