fixed up rounding issues