Merge fixes by aogilvie