This commit is a squashed backport of the following commits on the master branch: * 099016b7e8 * 77d935b7ae * d07b910149 * 519dfe1591 * a59d5acfab
099016b7e8
77d935b7ae
d07b910149
519dfe1591
a59d5acfab