Fixed date range bug