Statistics messed up after sensor was offline

Last year, the raspberry pi monitoring my smartmeter was offline.
When I reconnected it, the statistics of my gas meter were messed up.

How can I fix this?