I would not change any sensors unless the scan indicated it to be the problem. When you shut the engine off it will reset the soft codes in the computer. The code will still show up with a code scanner until the codes are cleared. I would bet you had some slippage in the transmisson and it set a code, then the computer went into limp mode (higher line pressure which caused the hard shifts), but you will not know until you check the codes. If it is starting to slip you may be headed for a rebuild. I would also check you fluid and be sure it is at the right level.
Jim