Cookie bug fixes