Refix due to accidental revert of 9b5424f566.