Correct wrong usage of grouping commands