fix an issue in update_avg