Fixed a typo
Improved a db accessing
Changed an update timing for the latest statistics