fix a typo and add a test