C# sample fix