Revert "Revert to 31336d77289fa96411a73749ccef78f20d86ac0e"

This reverts commit c78163d47428a932a8cbcef2a458b3a1af467f82.