Backport bug fixes for 12.0.1.