Fix issue in localstorage adapter.