Fixed broken pipe problems when user exits client