fix(matrix): update equals method