fix for issue #247