Partially revert 5dac229eb87