fixing cookie processing