Added autojoin option.