Prevent air locks by filling the grease gun head before adding the new cartridge (Photo 1). Insert the new cartridge and screw on the barrel until it seats against the head. Then back it off two turns and release the spring tension. The remaining air should bleed out through the loose threads. Finish tightening the barrel.
If you've done that but still have an air lock, remove the plug (Photo 2).