Fix connection state.