fix occasional crash on startup
Merge pull request #1 from fossfreedom/master

fix occasional crash on startup