Fixed issue with event handlers in PeerConnector class