added regression tests for issue #16