Fix bugs of cov and loc