Fix for addTotals

addTotals didn't work as expected if you don't add array of fieldnames as parameter.
Now it works :)