from upstream rebase