fixed bug in update_params_with_groups