cookie bug fix