fix matrix*matrix inference