Fix initialState initialization using localStorage.