Merge pull request #3756 from schuetzm/fix-uninitialized-storage-class

Fix uninitialized variable
Merge pull request #3766 from 9rnsr/2.066

Cherry-picking commits from master to 2.066 branch (for beta4)