Fixed VS code analysis issues, CA2122 and CA1060