Merge changes from #1469 into 3.8.14.2 branch