test case and fix for issue #50