fix typo and avoid failure in alarm bookkeeping