Fix bug of cookie.