fixed check for as_group