better cookie param handling