Fixed the union of sets method.