Fix problem of trying to process null cookie