Post-merge fixes from upstream/master