Fixed null issue when cookie isn't deleted