Upstream updates

Merge latest changes from upstream.