fix cookie_handler a bit.