Fixed a bug in connect_default