automatic transmission is changing gears at random and on 1999 Kia Sephia

the engine repair light comes on and the transmission downchanges, the engine light goes of and the transmission selects the correct gear.
i changed transmission but no changes to the performance and the same problem occurs

Asked by for the 1999 Kia Sephia