Fixed issues from refactoring Peer