add protection for cookie tossing