If you have it upside down, drill a hole in the plastic cover to let water drain out of it if any water finds it's way in.
Also, the coughing and sputtering could be because of a bad MAF sensor. You could try to unplug them and it would force the car to run in open loop, where it doesn't use the MAF sensors. If your idle smooths out with them unplugged, then one of them is bad. I doubt it if they'd both go bad at the same time.
|