fix local storage problems