Partial revert of 9080389b0d6d2b7c725d3f6ab21db6259df19cf8