Made record_type to be a copy, not a reference