Correctly set the width of the text box