Massair flow sensor "stalling when come to stop " on 2006 Chevrolet Malibu Maxx

Rookie cbe0621eac06868b3efe0d8d1d3611e23c60d3114864ea2ec19a68cfbd3eebab
When the car starts to come to a stop it stalls. When you restart it and put it in reverse sometimes it will stall again. The MAFS has been changed. What else should be looked at. Can the computer remember the bad settings the MAFS has been sending the computer and still act as if the MAFS is still bad. How do you go about resetting the engine light.
(2) Answers
the code did say it was the mass air flow sensor. I test drove the car and did seem better response. shifting from reverse to drive several times while sitting still it would stall as if the key was shut off. Also is there a senor to shut down the engine if the transmission is low on fluid. I know theres no dip stick to check it and can you tell me where the plug is on the tranny to check the level of fluid?
Stop shooting parts at it, unless you have a deep wallet. What are the trouble codes that are causing the check engine light to come on?