bug fix: return distinct records