fixes the issue #13 "Turning off a column disables the total at the bottom"

the indents at the beginning of the lines are intentionally left without
changes, to make the changes more transparent
pure cosmetic update: indents formatting in code