As my square was out of alignment (and pretty useless because of that) I decided to have a play to see if I could improve it. In my case the problem seemed to be with the accuracy of the milling of the interior of the stock, and not with the straightness of the ruler or the groove running down the rule being out of parallel with the edge of the rule.
If you've got the same issue this video may help you out. If your problem is the ruler's edge not being straight, or the groove in the ruler not being straight and parallel with the edge, I can't see how you'd fix that without serious effort.