fixes for C#