fix groups selection bug