fix some typos and add test