Add max-out grouping strategy to composition layer
Fix bugs in generating result