segfault fix for Connect()