fixed getTextWidth() returning 0 when text wraps

fixes half of #471.
getTextWidth() should not return 0 anymore when text wraps.