fixed disconnect bug