Fixes bug in GEMM