Bugfix: cookies not being generated when items are disposed.