Improve handling of selection groups