fix localstorage problem