Fix small error and add test for it