fix matrix tests