Fix. the order and group generate