Rough shifting occurred then emissions light came on on 2006 Ford Fusion

Today I was driving in traffic and I noticed the car was shifting rough. I then noticed the emissions light was on. The rough shifting continued for a bit but then was followed by unusually smooth shifting. This occurred previously and was supposedly corrected by replacing the intake manifold gasket, pcv valve, and O-rings which were causing a vacuum leak. Unfortunately it is doing it again. What might be wrong?

Asked by for the 2006 Ford Fusion
What are the trouble codes?