proposed fix for issue #38