fix the cookie issue