small bug fix to the cookie setting