fixed None error when cookie gets outdated