Fixed a bug with cookie TTL