Fixed crash on too many power cycles.
Merge pull request #17 from sonic45132/master

Fixed crash on too many power cycles.