fix issue #2 ReferenceError: LocalStorage is not defined