Added a test and fixed a typo