Fix bug in infinite timeseries detection