Added .dup for HashMap and HashSet only when I know they will be correct. Removed the incorrect .idup.