Fix variance calculation.