Issue #349: Add a test and revise existing tests
Fix #349