fix cookie storage