Rounding error fixes