Fix bug in the summation algorithm.

Quick'n'dirty fix for the summation algorithm if the input series don't
have the same number of data points.
Merge pull request #347 from afics/summation-fix

Fix bug in the summation algorithm.