Added handling of group priorities.