fix primary/secondary conditional issue.
Merge pull request #25 from amida-tech/matching-bug

fix primary/secondary conditional issue.