Fixed a bug with quitting on the client and the server