Corrected issue with cookie safety check.