add test for issue #337