Fix errors for connect