Cherrypick latest commits from upstream