tries to fix cookie bug