Bug fixes and added autoconnect config option.