Fixed the p2pHelper's bugs