Fix bug in cookie conversion.