In my experience, 90% of the time the base material isn't clean enough.
Here are two suggestions I found:
Stop Porosity and Worm Tracking
Porosity and wormtracking are both common weld discontinuities that can weaken the integrity of your welds. Porosity results when gas becomes trapped in the weld metal and can appear at any specific point on the weld or along its full length. To prevent this problem, remove any rust, grease, paint, coatings, oil, moisture and dirt from the base metal prior to welding. Using filler metals with added deoxidizers also helps weld through such contaminants, but these products should never replace proper pre-cleaning. Next, maintain an appropriate electrode extension or stick-out. As a general rule, the wire should extend no more than 1 1/4-in. beyond the contact tip.
To prevent worm trackingmarks on the surface of the weld bead caused by gas that the flux in the core of the wire createsavoid excessive voltage for your given wire feed setting and amperage. It is best to follow the parameters recommended by the filler metal manufacturer for the specific diameter of welding wire. If worm tracking does occur, reduce your voltage by increments of one half volt until you eliminate the problem.
Eliminate Slag Inclusions
Slag inclusions occur when the slag generated by the molten flux in the wire's core becomes trapped inside of the weld. There are four major causes of slag inclusions, all of which can be prevented with proper welding techniques.
First, avoid incorrect weld bead placement, especially when making multiple passes on thick sections of metal, such as needed for the root passes of welds or wide v-groove openings. Be certain to provide sufficient space in the weld joint for additional passes, particularly on joints requiring multiple passes.
Second, maintain the correct travel angle and travel speed. In the flat, horizontal, and overhead positions your drag angle should be between 15 and 45 degrees. In the vertical up position, your drag angle should be between 5 and 15 degrees. If you experience slag inclusions at these angles, you should increase your drag angle slightly. Maintain a steady travel speed; if you travel too slowly, the weld puddle will get ahead of the arc and create slag inclusions.
Next, maintain proper weld heat input, as too low of welding heat input can also cause slag inclusions. Always use the manufacturer's recommended parameters for a given wire diameter. If slag inclusions still occur, increase the voltage until the inclusions cease.
Finally, be certain to clean thoroughly between weld passes, removing any slag with a chipping hammer, wire brush or grinding before beginning your next weld pass