Adjusting the disconnect code