Don't know for sure but it sounds like you're switching something to do with the AC / heater vents or recirculation mode. Most of those are controlled by "motors" that run on engine vacuum instead of electricity. If one of them has a leak, or the hose going to it has a leak, the engine will "see" that vacuum leak when that part is switched into the circuit. A vacuum leak allows air into the engine that the Engine Computer doesn't know about so it won't command the right amount of fuel to go with it. The engine will hesitate or stumble upon acceleration.
You said it "runs better" which implies at times it runs worse, but you never stated what "worse" means.
Please consider a to help us answer more questions.
Monday, October 22nd, 2012 AT 10:47 PM