proposed fix for issue #12