fix issue #45: Make TLS work with diagonal covariance