fixes error thrown in firefox
Merge pull request #241 from poops/master

fixes error thrown in firefox on localstorage