manually merging in the last change from pull #247