add global-mode and fix typo