Another thing to check is to see if you have gunk built up around the butterfly valve in the throttle body. For a while, whenever I reset the ECU or did a battery pull the car would have issues returning to idle for a few days. If there's excess gunk in there the ECU needs more time to learn how much to crack open the valve for a smooth idle.