Updated to handle group name attribute properly.