Mechanical compression of the lid margin immediately before and during cataract surgery increased the risk for bacterial contamination of the surgical field , perhaps due to secretions from the lid margin glands .