Partially revert commit d1a779017bfdd01fe0baefdabc42814e1768d83d