Fix issue #243 and update test.