fixed disconnect check