Backport fix to solve warning problems.