Added regression tests for issue #17