fix cookie output bug