add test for issue 247