Tweaked the auto resize code for the text