a Buddy of mine had the same erratic transmission problem in his 99 CTD 140000 miles Did all the normal stuff , connections, reflash, Dealer who replaced the valve body of the transmission still no fix, then he ran into a retired dodge mech. who told him to change the alternator out, the field coil starts to go bad and sends out stray voltages or something like that, the Dealer in Kenai AK gave him the valve body change out for free cause it did not fix the problem, so my friend went in to buy the alternator and the laughed him and said he is throwing his money away he installed the alternator and immediately his transmission shifting problems went away like night and day he said.