Implement issue #47.