fixed bug where if localstorage is undefined get error