Fixes on Repository, added aditional SET to avoid duplicates.