Fix cookie check.