fixed localStorage issue