Fix problem with connect