Fixes problems in text drawing.