bugfixes and beginnings of connect support