Fix typo and test cases