figured out why the server crashes when a user disconnects