Fixed a bug when element sets had only one element.