cleaning + fix logic when using _a peer_ as server