correct fillText issues

I had issues with ctx.fillText after investigating a little, i found that this was the problem.

i dont know much about c++ but it seems to be a reasonable solution