#53: added integration test to catch problem and fixed it.