lowered the limit of the history table
fix the average calculation for stats