Cherrypicked 5ea7