Fixed min and max totals

The keys for min and max totals were wrong and they should not have been inside the units hash.