fixed: crash when painting some texts.
Start-up optimisations.