add a unit test for #251