fixed localstorage errors