fixed bug concerning sub groups
fixed small bug