Fix bug in text control width setting