Fix #24; Fix #26: Improve test cases