fix bug about connection with C