Fixed the Grand Total Row so that it is calculated.
Before it was hardcoded and didn't work if you wanted to use more or
less memtypes. It should now work for anysetup.