Merged latest changes from upstream/master.