Fix errors with previous commit

- ruby doesn't have ++ operator
- @logs may have fewer items than date_range, so prevent index out of bounds