fixed counting of valid cases in fill_covariance