avoid inf values in metal + add correlations matrix