fixed error in rounding