Fix for the text length method failing sometimes.