Security fixes for .NET 4.0