fixing date range issue