Fix group ordering bug.