prevent forever set loop

prevent forever set loop while ever cookie is not setted