Fix cookie creation when temp data is null