Resolve problem with duplicates in DB