a bug in index_by_day