Proposed fix for issue #31