Fixed error in naive covariance calculation.