Fix #9 and add test case.