more mask layout fixes