Minor adjustments to width calculation of flexible text field