fix cookie reset