Fix breakage for connect function after API change (connect -> connect_fn)