fix number of digit check for rounding