Bug Fix. Feature was not removing duplicates. The cast to set was in the wrong place