Backfire when cold

My 340 has recently been backfiring
Out the exhaust at slow speed when cold,
And running rough all the time.
Wound up being the brake booster leaking
Vacuum.