fixed localstorage cookie sync bug