patch for #247