Fix bug in LocalStorageAdapter.