Fix for matrix multiplication