I am unsure if the update of _max_diag_coeff is correct implemented.