Capillary filling with the effect of pneumatic pressure of trapped air