Partially revert 0d43b8e759bed0a78586c15f372e0dd4224a9515

Because it introduces regression.