fixing ordering of the classes on the totals page