Fixed bug where disconnecting peer caused server crash