invalid targets exclusion corrected

invalid target weights now set to zero;
weight of only max_targets compared;