fixed disconnect; gcc warning