Changed select statement to 'select distinct'