fix rounding up problem