fix cookie error problem