fix localstorage bug