sync with upstream dbfb2f8