Fix bug in get_dates_vals when intervals is an empty list