Added disconnect function.