Fix a typo that causes wrong behavior

The Avg function is calling “Sum” which is not the intended behavior.