fixed bug with daily average