Fix a bug in fold/avg
Merge pull request #66 from Netflix/fix-fold-avg

Fix a bug in fold/avg