Fix wrong categorization on costs

by_cost wrongly counted +2 as 2.
Unify the way to categorize by specific values
Merge branch 'fix-wrong-categorization'