Minor adjustments to cookie implementation