Fixed typo and added test.