Revert commit acc4e754731fdab82753edf9fd3776886443b840 as it caused major regressions