Added disconnect checking code