integrated changes from upstream