fixed the errors but local storage unavailable