fixes cookie ttl handling