Avoid duplicates in sprand