add test case for issue #399