fixed bug for copying records, now typvar is copied as well