fix get cookie bug