In you on join event and future events you should include an if ($dialog(Chan)) so that you don\'t receive an error.