fix occasional crash when starting
Merge pull request #2 from fossfreedom/master

fix occasional crash when starting