proposed fix for issue #7