Add test for possible unwanted resize
Avoid unwanted resize of covariance