make average 0 instead of nil when empty