Added disconnect/dropout code