Fix segfault in connect_destroy()