fixed localstorage bug