fix matrix validate