fix parsing foreign cookies