add a unit test for #116
Fixed #116