Fix bug of CookieManager