fix typo, check active mode before increment