covariance matrix fixes