fixed the date range issue