Partial revert of d43a754613e3fa1491f835887018db915245f622.