fixed an issuw with localstorage