handle rounding error