sync with upstream 71e5b8c1da