Fix group api to work with group_type param