Bugfixes CSharp MethodGenerator