Rough idle code 520344

First I would just like to say thanks in advance for any help that I might recieve. I dug through the Internet for two days and couldn’t find anything on this matter. So here’s the story. My bike was in a mud hole with water just up to the fender on the right side and the bike died. I fired it right back up with no problem and ran another two hours. This past weekend I rode again and as soon as I left the truck it died at a low rpm. The bike then seemed to "hunt" for idle. It would move around about 50 to 100 rpm’s during this event. It is throwing the 520344 with a 17 under it. That means adaptive fuel correction and the 17 means it is low. What part do I throw at this thing. I changed the voltage regulator out last weekend and it ran fine. I think it is the O2 sensor. The map sensor looked clean. Any thought? Thanks in advance!