CSharp: Fixing Random-bug