improve disconnect