Thanks to brotalnia, tkrokli, offl and Weyrath (cherry picked from commit fc1d8113e678ab1572a85f345d715360dd0a3ca4)