updated to ensure that reference records are correctly classified.