Fix fractions calculation