fix autogroup with selections
Merge branch '1.x' into 2.x