fix primary/secondary conditional issue.