fix totalsum error
Merge pull request #71 from ansmirnov/ktv

fix totalsum error