Added check to cookie available