Matrix multiplication corrention

Correct the multiplication bugs. Now it gives correct results for the multiplication.