Latex sum and bracket formating

If I do the following:
TCanvas c(“c”,“c”,0,0,300,300);
TLatex x;
x.DrawLatex(0.1,0.8,"#left[ #frac{1}{n} #sum_{i}^{N} x_i #right]");

The formatting gets messed up. Some how, adding brackets around a summation does not render properly. I’ve attached the picture of the formatting.


Is there a problem with my formatting? Or is this a bug?

Looks like a bug. To be check.

Note that:

x.DrawLatex(0.1,0.8,"[ #frac{1}{n} #sum_{i}^{N} x_i ]");

seems better.