Fixed code to support field width and precision