Fixed bug where number of actual weeks/months of data wasn't used in computing average