Fix to cookie errors with preview.