Fixes TypeError. group.elements are objects, not arrays.