bugfixes for auto-connect procedure (more to come)