sync with upstream 866eb1da