Backport #378 to release14 branch

This pull request backports #378 into release14 branch.