Implement issue #31