Fix localstorage problem