fixing cookie check if