fix of tomas bocek in PeerSocket