added a unit test for the #122 issue