fix cookie bmode bug