fix crash with gfx.drawText()