Fixed client disconnect and warnings.