This reverts commit c991a0e8f73572689cec379250667c11450046d8. In order to avoid big conflicts with #3015