Fix client connect handler