Fixed bug where line position would sometimes become negative while drawing text.