fixed int overflow when trying to show history of the last 30 days