Modified the activateRow and activateColumn templates to copy the entire matrices.