fix return of connect