Fix server crash on client disconnect