fix rounding functionality