fix typo and tests