potential fix to crash on windows startup
Merge pull request #3938 from ZappoMan/fixcrash

potential fix to crash on windows startup