fixed multi-group bug