Glad you got it figured out. I trust OEM sensors from a junkyard over any aftermarket from an auto parts store.
They due tend to gunk up sometimes and will need to be cleaned with parts cleaner and manually open and close the valve.
Just dealt with this yesterday. Car would only idle a 2K...