Add ModalDialog for switch branch error [stupid commit]