fixed peerhandler init logic