small bugfix in c# code