Fix exception when influxdb fails occationally