If air bubbles are in your frosting it is caused by whipping the frosting too vigorously which allowed unwanted pockets of air to develop. To prevent this, ensure your butter is at room temp and set your mixer to a slower speed.