BZ947 Add fix for invalid disconnection logic