Fix typo, add tests