Fixed bug in add_to_group.