fixing client disconnect