Fix CA2214 warnings