Fix output of magres tensors for new internal format