Fixed a bug in the server causing the server to stop working after a client disconnected