Add some disconnection code