Split out from #465
Split out from #465