Fixed grounding issues and masks