I found the problem. It's the line containing t.NumberOfMissedRuns.ToString()
Not sure what is happening, but when I comment out that line everything works fine.
Not sure what is happening, but when I comment out that line everything works fine.