Date sort_by fix