Fix startup errors.
Merge pull request #9814 from vlad852/master

Fix startup errors