Fixed bug in advanced mat mult