sync with upstream bbe3d98d