Correct copy of dimnames on final matrix