Fixing errors in peer.py