Fix computation of objective function in OSR when covariances are specified