Fixed automatic assignment of group so that it is the last one in the list