2000 Toyota ECHO shifting problems

My car (with an automatic transmission) will not shift into 4th gear, but shifts correctly otherwise. The error code I’ve been getting is P0500. My vehicle speed sensor was recently replaced, the speedometer works, and the wiring leading from the vehicle speed sensor appears to be okay. About a year ago it was shifting hard, and would erratically shift into and out of 4th gear on the highway. I noticed that the transmission fluid level was slightly too high (I’m not the original owner), and so I drained and refilled the transmission fluid reservoir (not a complete flush) to the proper level because the fluid was discolored. Immediately afterwards it shifted harder than ever before. Shortly afterwards it began to shift properly, but has not shifted into 4th gear since that time. If you have any idea what might be causing this problem I would greatly appreciate any feedback.

You need to take your vehicule to an independant shop or a Toyota dealer ASAP. Severe damage to the transmission could occur if you keep driving this car.