fix error in disconnect