Partial revert of 49868d519