Merge "Fix setting STATE_DISCONNECTED twice"