add test case and fix for issue #53