Fix typo and tests