Oh actually the bug was totally unrelated to the drawing thing. It was essentially miscounting the number of characters on the line so it would truncate way too soon. I made a quick fix for it so it shouldn't happen any more!