Merging in fix from #8222